package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbDetectionRlMapper;
import com.ruoyi.system.domain.TbDetectionRl;
import com.ruoyi.system.service.ITbDetectionRlService;

/**
 * 熔炼质检光谱结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-11
 */
@Service
public class TbDetectionRlServiceImpl implements ITbDetectionRlService 
{
    @Autowired
    private TbDetectionRlMapper tbDetectionRlMapper;

    /**
     * 查询熔炼质检光谱结果
     * 
     * @param id 熔炼质检光谱结果主键
     * @return 熔炼质检光谱结果
     */
    @Override
    public TbDetectionRl selectTbDetectionRlById(Long id)
    {
        return tbDetectionRlMapper.selectTbDetectionRlById(id);
    }

    /**
     * 查询熔炼质检光谱结果列表
     * 
     * @param tbDetectionRl 熔炼质检光谱结果
     * @return 熔炼质检光谱结果
     */
    @Override
    public List<TbDetectionRl> selectTbDetectionRlList(TbDetectionRl tbDetectionRl)
    {
        return tbDetectionRlMapper.selectTbDetectionRlList(tbDetectionRl);
    }

    /**
     * 新增熔炼质检光谱结果
     * 
     * @param tbDetectionRl 熔炼质检光谱结果
     * @return 结果
     */
    @Override
    public int insertTbDetectionRl(TbDetectionRl tbDetectionRl)
    {
        tbDetectionRl.setCreateTime(DateUtils.getNowDate());
        return tbDetectionRlMapper.insertTbDetectionRl(tbDetectionRl);
    }

    /**
     * 修改熔炼质检光谱结果
     * 
     * @param tbDetectionRl 熔炼质检光谱结果
     * @return 结果
     */
    @Override
    public int updateTbDetectionRl(TbDetectionRl tbDetectionRl)
    {
        return tbDetectionRlMapper.updateTbDetectionRl(tbDetectionRl);
    }

    /**
     * 批量删除熔炼质检光谱结果
     * 
     * @param ids 需要删除的熔炼质检光谱结果主键
     * @return 结果
     */
    @Override
    public int deleteTbDetectionRlByIds(Long[] ids)
    {
        return tbDetectionRlMapper.deleteTbDetectionRlByIds(ids);
    }

    /**
     * 删除熔炼质检光谱结果信息
     * 
     * @param id 熔炼质检光谱结果主键
     * @return 结果
     */
    @Override
    public int deleteTbDetectionRlById(Long id)
    {
        return tbDetectionRlMapper.deleteTbDetectionRlById(id);
    }
}
